/*
 * main.cpp
 *
 *  Created on: 12.05.2013
 *      Author: Roma Jam
 */


#include "kl_lib.h"
#include "encoder.h"

inline void GeneralInit(void);

int main(void){
	GeneralInit();

	while(1){
		Uart.Task();
		Encoder.Task();
		if(Encoder.NeedToCheck()){
			Uart.Printf("Cnt: %u\r", Encoder.GetValue());
		}
	}
}

inline void GeneralInit(void){
	klJtagDisable();
	Delay.Init();
	Uart.Init(500000);
	Encoder.Init();

	Uart.Printf("\rEncoderReader\r");
}


